<template>
	<view>
		<view class="tou">
			<image src="../../static/4.jpg" mode="aspectFill"
				style="width: 140rpx;height: 140rpx;border-radius: 20rpx;border: #769fe4 5rpx solid;"></image>
			<view class="tou-text" @click="topage('个人信息')">
				<text style="font-size: 40rpx;margin-right: 20rpx;">张三</text>
				<text>技术部</text><br />
				<text>长沙XXXXXX有限公司</text>
			</view>
		</view>
		<view class="content">
			<view v-if="a==1" @click="topage('企业管理')" class="content-item">
				<view style="display: flex;justify-content: flex-start;align-items: center;">
					<view style="background-color: #eaf3fe;padding: 5rpx;border-radius: 10rpx;margin-right: 20rpx;">
						<u-icon name="home-fill" color="#aa00ff" size="60rpx"></u-icon>
					</view>企业管理
				</view>
				<u-icon name="arrow-right"></u-icon>
			</view>
			<view @click="topage('实名验证')" class="content-item">
				<view style="display: flex;justify-content: flex-start;align-items: center;">
					<view style="background-color: #eaf3fe;padding: 5rpx;border-radius: 10rpx;margin-right: 20rpx;">
						<u-icon name="fingerprint" color="red" size="60rpx"></u-icon>
					</view>实名验证
				</view>
				<u-icon name="arrow-right"></u-icon>
			</view>
			<view v-if="a==1" @click="topage('访问记录')" class="content-item">
				<view style="display: flex;justify-content: flex-start;align-items: center;">
					<view style="background-color: #fff8e4;padding: 5rpx;border-radius: 10rpx;margin-right: 20rpx;">
						<u-icon name="edit-pen-fill" color="#fddb78" size="60rpx"></u-icon>
					</view>访问记录
				</view>
				<u-icon name="arrow-right"></u-icon>
			</view>
			<view v-if="a==1" @click="topage('统计分析')" class="content-item">
				<view style="display: flex;justify-content: flex-start;align-items: center;">
					<view style="background-color: #eaf3fe;padding: 5rpx;border-radius: 10rpx;margin-right: 20rpx;">
						<u-icon name="grid-fill" color="#76adfe" size="60rpx"></u-icon>
					</view>统计分析
				</view>
				<u-icon name="arrow-right"></u-icon>
			</view>
			<view v-if="a==0" @click="topage('防疫信息')" class="content-item">
				<view style="display: flex;justify-content: flex-start;align-items: center;">
					<view style="background-color: #eaf3fe;padding: 5rpx;border-radius: 10rpx;margin-right: 20rpx;">
						<u-icon name="grid-fill" color="#76adfe" size="60rpx"></u-icon>
					</view>防疫信息
				</view>
				<u-icon name="arrow-right"></u-icon>
			</view>
			<view @click="topage('设置')" class="content-item" style="border: none;">
				<view style="display: flex;justify-content: flex-start;align-items: center;">
					<view style="background-color: #eaf3fe;padding: 5rpx;border-radius: 10rpx;margin-right: 20rpx;">
						<u-icon name="setting" color="#36cdaf" size="60rpx"></u-icon>
					</view>设置
				</view>
				<u-icon name="arrow-right"></u-icon>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				a: 0
			}
		},
		onShow() {
			this.a = uni.getStorageSync('a')
		},
		methods: {
			topage(page) {
				switch (page) {
					case '个人信息':
						uni.navigateTo({
							url: './personalInformation'
						})
						break;
					case '企业管理':
						uni.navigateTo({
							url: '../enterpriseHomePage/businessManagement/certifiedEnterprise'
						})
						break;
					case '实名验证':
						uni.navigateTo({
							url: './idPhoto'
						})
						break;
					case '访问记录':
						uni.navigateTo({
							url: './personalInformation'
						})
						break;
					case '统计分析':
						uni.navigateTo({
							url: './statisticalAnalysis'
						})
						break;
					case '设置':
						uni.navigateTo({
							url: '../setup/setup'
						})
						break;
					case '防疫信息':
						uni.navigateTo({
							url: './fangyi'
						})
						break;
				}
			},
		}
	}
</script>

<style>
	.tou {
		height: 350rpx;
		background-color: #2984f8;
		border-radius: 0 0 60rpx 60rpx;
		padding: 30rpx 0 0 80rpx;
		display: flex;
		justify-content: flex-start;
	}

	.tou-text {
		color: #ffffff;
		margin-left: 30rpx;
		line-height: 70rpx;
		font-size: 30rpx;
	}

	.content {
		width: 85%;
		border-radius: 50rpx;
		padding: 50rpx 0rpx 50rpx 30rpx;
		box-shadow: 0 0 50rpx #87cdf8;
		background-color: #fff;
		margin: 0 auto;
		position: relative;
		top: -100rpx;
	}

	.content-item {
		padding-right: 30rpx;
		display: flex;
		justify-content: space-between;
		line-height: 120rpx;
		border-bottom: #dedede 1rpx solid;
	}
</style>
